package com.sun.office.excel;

/**
 * 跨行元素元数据
 * @author lihhz
 *
 */
public class CrossRangeCellMeta {

	/**
	 * 
	 * @param firstRowIndex 起始行
	 * @param firstColIndex 起始列
	 * @param rowSpan 合并行数目
	 * @param colSpan 合并列数目
	 */
	public CrossRangeCellMeta(int firstRowIndex, int firstColIndex, int rowSpan, int colSpan) {
		super();
		this.firstRowIndex = firstRowIndex;
		this.firstColIndex = firstColIndex;
		this.rowSpan = rowSpan;
		this.colSpan = colSpan;
	}

	private int firstRowIndex;
	private int firstColIndex;
	private int rowSpan;// 跨越行数
	private int colSpan;// 跨越列数

	int getFirstRow() {
		return firstRowIndex;
	}

	int getLastRow() {
		return firstRowIndex + rowSpan - 1;
	}

	int getFirstCol() {
		return firstColIndex;
	}

	int getLastCol() {
		return firstColIndex + colSpan - 1;
	}

	int getColSpan() {
		return colSpan;
	}
}